<template>
  <mt-header :title="title" class="header">
    <a @click="back" slot="left">
      <mt-button icon="back"></mt-button>
    </a>
  </mt-header>
</template>

<script>

  export default {
    name: "title-header",
    props: ['title'],
    methods: {
      back() {
        history.go(-1);
      }
    }
  }
</script>

<style scoped>
  /*公共头部和底部样式*/
  .header {
    text-align: center;
    width: 100%;
    height: 0.5rem;
    line-height: 0.5rem;
    background-color: #242b34;
    font-size: 0.16rem;
    position: relative;
    color: #fff;
  }

  .header .back-box {
    position: absolute;
    left: 0.23rem;
  }

  .back-box img {
    margin-top: 0.15rem;
    width: 0.20rem;
    height: 0.20rem;
  }
</style>
